<?php

class Order_Field_Core extends Field
{
	public $direction;
	public $direction_label;
	
	public function __construct($name)
	{
		parent::__construct($name);
		if (isset($_GET['row'])) {
			if ($_GET['row'] == $this->name) {
				$this->direction = ($_GET['ord'] == 'asc') ? 'desc' : 'asc';
			}
		} else {
			$this->direction = 'asc';
		}
		$this->direction_label = Kohana::lang('grid.'.$this->direction);
	}
}
